package main

import (
	"context"

	"github.com/cloudwego/eino/compose"
	"github.com/cloudwego/eino/schema"
)

func Buildcurrenttime(ctx context.Context) (r compose.Runnable[[]*schema.Message, *schema.Message], err error) {
	const Lambda1 = "Lambda1"
	g := compose.NewGraph[[]*schema.Message, *schema.Message]()
	lambda1KeyOfLambda, err := newLambda(ctx)
	if err != nil {
		return nil, err
	}
	_ = g.AddLambdaNode(Lambda1, lambda1KeyOfLambda)
	_ = g.AddEdge(compose.START, Lambda1)
	_ = g.AddEdge(Lambda1, compose.END)
	r, err = g.Compile(ctx, compose.WithGraphName("currenttime"))
	if err != nil {
		return nil, err
	}
	return r, err
}
